package com.tj.mapper;

import com.tj.pojo.SetMeal;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SetMealMapper {
    @Select("select * from setmeal")
    List<SetMeal> findAllList();
    @Select("select * from setmeal where name like '%${value}%'")
    List<SetMeal> findSetMealListByName(String name);
    @Select("select * from setmeal where smId = #{smId}")
    SetMeal findSetMealById(int smId);
    @Insert("insert into setmeal(smId, name, type, price) values (#{smId}, #{name}, #{type},#{price})")
    int insertSetMeal(SetMeal setMeal);
    @Update("update setmeal set smId = #{smId},name = #{name},type = #{type},price = #{price} where smId = #{smId}")
    int updateSetMeal(SetMeal setMeal);
    @Delete("delete from setmeal where smId = #{smId}")
    int deleteSetMeal(SetMeal setMeal);
}
